package com.keur.money.http

import com.keur.money.utils.okhttp.callback.StringCallback
import com.keur.money.utils.okhttp.model.HttpParams
import org.json.JSONObject

/**
 * MullaFlow
 * @Author wwdeng
 * @CreateTime: 2024/7/24 17:35
 * @Annotation：
 */
interface IHttpLoader {

    /**
     * Get 方式请求
     *
     * @param url
     * @param params
     * @param callback
     */
    fun gKeurAction(url: String, params: HttpParams, callback: IHttpCallback)

    /**
     * POST方式请求
     *
     * @param url
     * @param params
     * @param callback
     */
    fun postKeurAction(url: String, params: JSONObject, callback: IHttpCallback)

    /**
     * 添加埋点
     */
    fun addKeurEventAction(eventName: String, remark: String="")

    /**
     * 提交埋点
     */
    fun postKeurEventAction(url: String, params: JSONObject, callback: IHttpCallback)

    /**
     * POST方式请求 (文件上传)
     *
     * @param url
     * @param file
     * @param callback
     */
    fun uploadKeurFileAction(httpUrl: String, filePath: String, callback: StringCallback)

    /**
     * POST方式请求 (文件上传)
     *
     * @param url
     * @param file
     * @param callback
     */
    fun uploadKeurFileAction(httpUrl: String, filePath: String, callback: IHttpCallback)
}